com.rscja.team.mtk.deviceapi

## Class RFIDWithISO15693_mtk

- java.lang.Object
- - com.rscja.team.mtk.deviceapi.RFIDBase_mtk
  - - com.rscja.team.mtk.deviceapi.RFIDWithISO15693_mtk

- All Implemented Interfaces:
    IRFIDBase, IRFIDWithISO15693

      public class RFIDWithISO15693_mtk
      extends RFIDBase_mtk
      implements IRFIDWithISO15693

  RFID模块ISO15693协议操作类,
  RFID module ISO15639 protocol operation type

  注意：
  Attention:
  1、使用前请确认您的机器已安装此模块。
  1. Make sure this module is installed before using your device.
  2、要正常使用模块需要在\libs\armeabi\目录放置libDeviceAPI.so文件
  2. Put libDeviceAPI.so file in directory \libs\armeabi\ then module can be used normally.
  3、在操作设备前需要调用 `RFIDBase_mtk.init()` 打开设备，使用完后调用 `RFIDBase_mtk.free()` 关闭设备
  3. Call `RFIDBase_mtk.init()` to switch on device before using device, call `RFIDBase_mtk.free()` to switch off the device after using.

  Author:
    liuruifeng

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RFIDWithISO15693_mtk.TagType` 标签类型 Tag type

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `char[]` | `genericFunction_ex(char command, char IcMfg, char[] databuf, int datalen)`
    `char[]` | `genericFunction(char command, char[] databuf, char datalen)`
    `static RFIDWithISO15693_mtk` | `getInstance()` 获取ISO15693协议操作实例 Acquire ISO15693 protocol operation Instance
    `ISO15693Entity` | `inventory()` 读卡 read card
    `boolean` | `isPowerOn()` 判断设备是否上电 Judge the device is powered on or not.
    `boolean` | `lockAFI()` 锁定AFI lock AFI
    `boolean` | `lockDSFID()` 锁定DSFID lock DSFID
    `ISO15693Entity` | `read(int block)` 读取块数据 read block data
    `ISO15693Entity` | `read(int startBlock, int Blocklen)` 读取块数据 block data
    `java.lang.String` | `read(ISO15693Entity entity, int block)`
    `boolean` | `write(int startBlock, int Blocklen, java.lang.String hexData)` 写卡 card writing
    `boolean` | `write(int block, java.lang.String hexData)` 写卡 card writing
    `boolean` | `write(ISO15693Entity entity, int block, java.lang.String hexData)`
    `boolean` | `writeAFI(int iAFI)` 写入AFI Write AFi
    `boolean` | `writeDSFID(int iDSFID)` 写入DSFID Write DSFID

    - ### Methods inherited from class com.rscja.team.mtk.deviceapi.RFIDBase_mtk

      `free, getVersion, init, init, rfidUpgrade`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.rscja.deviceapi.interfaces.IRFIDBase

      `free, getVersion, init, init, isPowerOn, rfidUpgrade`

- - ### Method Detail

    - #### getInstance

          public static RFIDWithISO15693_mtk getInstance()
                                                  throws ConfigurationException

      获取ISO15693协议操作实例
      Acquire ISO15693 protocol operation Instance
      Returns:
        ISO15693协议操作实例
        ISO15693 protocol operation Instance
      Throws:
        `ConfigurationException` - 配置错误异常
        Configuration err

    - #### inventory

          public ISO15693Entity inventory()

      读卡
      read card
      Specified by:
        `inventory` in interface `IRFIDWithISO15693`
      Returns:
        返回ISO15693Entity实体，寻卡失败返回null
        return ISO15693Entity body, card searching failed return null

    - #### read

          public ISO15693Entity read(int block)
                              throws RFIDReadFailureException

      读取块数据
      read block data
      Specified by:
        `read` in interface `IRFIDWithISO15693`
      Parameters:
        `block` - 块区
        block
      Returns:
        返回ISO15693Entity实体，寻卡失败返回null
        return ISO1593Entity body, card searching failure return null
      Throws:
        `RFIDReadFailureException` - 读卡失败异常
        card reading err

    - #### read

          public java.lang.String read(ISO15693Entity entity,
                                       int block)
                                throws RFIDReadFailureException

      Specified by:
        `read` in interface `IRFIDWithISO15693`
      Throws:
        `RFIDReadFailureException`

    - #### read

          public ISO15693Entity read(int startBlock,
                                     int Blocklen)
                              throws RFIDReadFailureException

      读取块数据
      block data
      Specified by:
        `read` in interface `IRFIDWithISO15693`
      Parameters:
        `startBlock` - 块区
        block
        `Blocklen` - 块区
        block
      Returns:
        返回ISO15693Entity实体，寻卡失败返回null
        return ISO15693Entity body, card searching failure return null
      Throws:
        `RFIDReadFailureException` - 读卡失败异常
        Card reading err

    - #### write

          public boolean write(int block,
                               java.lang.String hexData)
                        throws RFIDNotFoundException

      写卡
      card writing
      Specified by:
        `write` in interface `IRFIDWithISO15693`
      Parameters:
        `block` - 块区
        block
        `hexData` - 十六进制数据
        hexdecimal data
      Returns:
        true成功，false失败
        true success, false failure
      Throws:
        `RFIDNotFoundException` - 寻卡失败异常
        card searching err

    - #### write

          public boolean write(ISO15693Entity entity,
                               int block,
                               java.lang.String hexData)
                        throws RFIDNotFoundException

      Specified by:
        `write` in interface `IRFIDWithISO15693`
      Throws:
        `RFIDNotFoundException`

    - #### write

          public boolean write(int startBlock,
                               int Blocklen,
                               java.lang.String hexData)
                        throws RFIDNotFoundException

      写卡
      card writing
      Specified by:
        `write` in interface `IRFIDWithISO15693`
      Parameters:
        `startBlock` - 块区
        block
        `hexData` - 十六进制数据
        hexdecimal data
      Returns:
        true成功，false失败
        true success, false failed
      Throws:
        `RFIDNotFoundException` - 寻卡失败异常
        card searching err

    - #### writeAFI

          public boolean writeAFI(int iAFI)
                           throws RFIDNotFoundException

      写入AFI
      Write AFi
      Specified by:
        `writeAFI` in interface `IRFIDWithISO15693`
      Parameters:
        `iAFI` - AFI值
        AFI value
      Returns:
        true成功，false失败
        true success, false failed
      Throws:
        `RFIDNotFoundException` - 寻卡失败异常
        card searching err

    - #### lockAFI

          public boolean lockAFI()
                          throws RFIDNotFoundException

      锁定AFI
      lock AFI
      Specified by:
        `lockAFI` in interface `IRFIDWithISO15693`
      Returns:
        true成功，false失败
        true success, false failed
      Throws:
        `RFIDNotFoundException`

    - #### writeDSFID

          public boolean writeDSFID(int iDSFID)
                             throws RFIDNotFoundException

      写入DSFID
      Write DSFID
      Specified by:
        `writeDSFID` in interface `IRFIDWithISO15693`
      Parameters:
        `iDSFID` - DSFID值
        DSFID value
      Returns:
        true成功，false失败
        true success, false failed
      Throws:
        `RFIDNotFoundException` - 寻卡失败异常
        card searching err

    - #### lockDSFID

          public boolean lockDSFID()
                            throws RFIDNotFoundException

      锁定DSFID
      lock DSFID
      Specified by:
        `lockDSFID` in interface `IRFIDWithISO15693`
      Returns:
        true成功，false失败
        true success, false failed
      Throws:
        `RFIDNotFoundException` - 寻卡失败异常
        card searching err

    - #### genericFunction

          public char[] genericFunction(char command,
                                        char[] databuf,
                                        char datalen)

      Specified by:
        `genericFunction` in interface `IRFIDWithISO15693`
      Parameters:
        `command` - 命令
        command
        `databuf` - 数据
        data
        `datalen` - 数据长度
        data length
      Returns:
        索引1表示状态，非零 失败， 0x00 成功，数据 64字节
        index 1 means status, NZ failed, 0x00 success, data 64 byte

    - #### genericFunction_ex

          public char[] genericFunction_ex(char command,
                                           char IcMfg,
                                           char[] databuf,
                                           int datalen)

      Specified by:
        `genericFunction_ex` in interface `IRFIDWithISO15693`
      Parameters:
        `command` - 命令
        command
        `IcMfg` - 厂商信息
        `databuf` - 数据
        data
        `datalen` - 数据长度
        data length
      Returns:
        索引1表示状态，非零 失败， 0x00 成功，数据 64字节
        index 1 means status, NZ failed, 0x00 success, data 64 byte

    - #### isPowerOn

          public boolean isPowerOn()

      判断设备是否上电
      Judge the device is powered on or not.
      Returns: